#coding:utf8

import sys
reload(sys)
sys.setdefaultencoding('utf-8')


from flask import Flask
from libapi import ApiDoc
from view3 import bp_v1
from views4 import bp_v2

app = Flask(__name__)
ApiDoc(app=app)

app.register_blueprint(bp_v2)
app.register_blueprint(bp_v1)



# for endpoint,method in app.view_functions.items():

# for rule in app.url_map.iter_rules():
#     print(rule.methods)


# print(['get', 'post', 'put', 'delete'])
if __name__ == '__main__':
    # ApiDoc.get_docs()
    # print(ApiDoc.docs)
    print(app.url_map)
    app.run(debug=True, port=5051)